<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>article list</title>
<link rel="stylesheet" href="/networkforum/css/article_list.css" />
<!–[if lt IE9]> 
<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]–>
<script type="text/javascript">
window.onload = function(){
	getDate();

}
function getDate(){
	var userId = window.parent.document.getElementById("userId").value;
	var kw = window.parent.document.getElementById("keyWords").value;
	var url = "/networkforum/article/article_list_view.do?userId="+userId+"&keyWords="+kw;
	//登录页面后通过myajax获取进一步的信息
	var myajax = getByAjax();
	myajax.init(null,"get",true);
	myajax.get(url,function(d){
		//var data = eval("("+d+")");
		var data = toJson(d);
		listInit(data);
	});	
	
	//好友分页
	myajax.get("/networkforum/friend/count_size.do",function(d){
		paging.page({
			index:0,
			total:Math.ceil(d/10),
			url:url,
			previou:document.getElementById("previouPage"),
			next:document.getElementById("nextPage"),
			current:document.getElementById("currentPage"),
			max:document.getElementById("totalPage"),
			callBack:listInit,
		});
	});
	myajax = null;
}
</script>
</head>

<body>
<section class="articleList">
	<ul id="listInner">
    	
    </ul>
    <div class="paging" id="paging">
   		<div class="clear"></div>
   		<span id="previouPage" style="cursor: pointer;">上一页</span>
   		<input id="currentPage" type="text" value = "1"/>	
   		<span id="nextPage" style="cursor: pointer;">下一页</span>
   		<span id="totalPage">共 1 页</span>
   	</div>
</section>
</body>
<script type="text/javascript" src="/networkforum/js/article_main.js"></script>
<script type="text/javascript" src="/networkforum/js/myajax.js"></script>
<script type="text/javascript" src="/networkforum/js/pageing.js"></script>
</html>
